var root=ui("$");
var nf = sm("do_Notification");

var helperOpen = require("helper/open");
var do_ALayout_1 = ui("do_ALayout_1");
//productItems =  ui("productItems");
var mallUrl = require("url/mall");
var communityUtil = require("helper/community");
var http = require("helper/http");
var shopId;
ui("imgLogo").source = "source://image/mall/logo.png";
root.on("touch", "", 3000, function(data) {
	http.post(mallUrl.url.product.getQqStore,{communityId:communityUtil.communityVisitId()},function(data){		
		/*
		if(data.qqStore && data.qqStoreProducts && data.qqStoreProducts.length>0){
			ui("shopnavImg").source = data.qqStoreProducts[0].img;
		}else{
			ui("shopnavImg").source = "";
		}
		*/
		if(!data.existQqStore||data.existQqStore!=="1"){
			nf.alert("便利店服务暂未覆盖该社区，敬请期待");
		}else{
			if(data.qqStore&&data.qqStore.id){
				shopId = data.qqStore.id;
				helperOpen.open("source://view/qshop/detail/main.ui",{shopId:shopId});
			}
		}
	});
});